package org.starapp.andriod.entity;

import javax.persistence.GenerationType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Column;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.DecimalMin;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import com.google.common.collect.ImmutableList;
import java.util.Date;
import java.util.List;
import java.io.Serializable;

/**
 * @author wangqiang@cisoft.com.cn
 *
 */
@Entity
@Table(name = "app_task")
public class Task implements Serializable{
		
				
		/**
		 * ID
		 */
		private long id;
				
		/**
		 * TITLE
		 */
		private String title;
				
		/**
		 * DESCRIPTION
		 */
		private String description;
				
		/**
		 * CREATE_DATE
		 */
		private Date createDate;
		
		
		
				
		@Id
		@GeneratedValue(strategy = GenerationType.IDENTITY)
		@Column(name="ID")
		@DecimalMin(value="0")
		public long getId(){
			return this.id;
		}
		
		public void setId(long id){
			this.id = id;
		}
		
				
		@NotBlank
		public String getTitle(){
			return this.title;
		}
		
		public void setTitle(String title){
			this.title = title;
		}
		
				
		public String getDescription(){
			return this.description;
		}
		
		public void setDescription(String description){
			this.description = description;
		}
		
				
		@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
		@Temporal(TemporalType.TIMESTAMP)
		public Date getCreateDate(){
			return this.createDate;
		}
		
		public void setCreateDate(Date createDate){
			this.createDate = createDate;
		}
		
		

		
		@Override
		public String toString() {
			return ToStringBuilder.reflectionToString(this);
		}
	
	}

